<?php 
//MOD: Get images using the image_attachment function (added to functions.php - originally from Proximity mods
//      search on fcn name to find mods
//Add excerpt with view full article link
//Add training tools to meta
//
//
?>
<?php if ( have_posts() ) { ?>

	<ul id="strips" class="noul">
		<?php
			$CATS = array();
			while ( have_posts() ) : the_post();
			
			$cats = array();
			$all_cats = get_the_category();
			foreach($all_cats as $c) {
				$cats['cat-'.$c->term_id] = $c->name;
				$CATS[$c->term_id] = $c->name;
			}
		?>
		<li class="entry <?php echo implode(' ', array_keys($cats)); ?>">
				<a href="<?php the_permalink(); ?>" class="thumb"><?php image_attachment('mct_sl_image', '190', '240'); ?></a>
				<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
				<div class="text"><?php prox_content_limit(350,''); //MOD: add special excerpt with link from prox ?></div>  
			<div class="meta">
				<span class="date"><?php the_time(get_option('date_format')); ?></span>
                                <?php do_action('prox_meta_home',$post->ID); //MOD: add training tools ?>
				<?php if (comments_open()): ?>
					<span class="comments"> <?php comments_popup_link('0 comments', '1 comment', '% comments', '', ''); ?></span>
				<?php endif; ?>
			</div>			

			<?php if(ide_option('comment_snippets')) ide_comment_snippets( $post->ID); ?>

			<div class="clear"> </div>
		</li>
		<?php
			endwhile;
		?>
	</ul>

	<div class="pagination">
		<div class="alignleft"><?php next_posts_link('&laquo; '._('Older Entries')); ?></div>
		<div class="alignright"><?php previous_posts_link(_('Newer Entries').' &raquo;'); ?></div>
		<div class="clear"> </div>
	</div>

	<script>
		var CATS = <?php echo json_encode($CATS); ?>;
	</script>
		
<?php } else {
		_e( !empty($empty_message) ? $empty_message : '<h1>Sorry!</h1>Sorry, the requested content was not found.');
	}
?>